<template>
  <div class="about">
    <h1>This is an about page</h1>
    <p>{{date}}</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      date: ''
    }
  },
  created() {
    this.timer = setInterval(() => {
      this.date = new Date()
    },1000)
  },
  beforeDestroy() {
    clearInterval(this.timer)
    console.log('页面马上销毁了');
  },
  destroyed() {
    console.log('页面销毁了');
    
  },
}
</script>
